
address.o:     file format elf64-littleaarch64


Disassembly of section .text:

0000000000000000 <main_>:
#include <stdio.h>
#include <string.h>
#include <stdlib.h>

int main_()
{
   0:	a9be7bfd 	stp	x29, x30, [sp, #-32]!
   4:	910003fd 	mov	x29, sp
	unsigned int address;
	int *p,  num = 123;
   8:	52800f60 	mov	w0, #0x7b                  	// #123
   c:	b90013a0 	str	w0, [x29, #16]              ; [x29+16] = num = 123

	p = &num;
  10:	910043a0 	add	x0, x29, #0x10
  14:	f9000fa0 	str	x0, [x29, #24] ; p = &num = num's address
	address = (unsigned int)p;
  18:	f9400fa0 	ldr	x0, [x29, #24] ; x0 = num's address
  1c:	b90017a0 	str	w0, [x29, #20] ; address = num's address

	printf("address = 0x%x\n  *p = %d\n  p = %p\n", address, *p, p); // 0xbffc9784  123   0xbffc9784
  20:	f9400fa0 	ldr	x0, [x29, #24]     ; x0 = p = num's address
  24:	b9400001 	ldr	w1, [x0]           ; w1 = num = 123
  28:	90000000 	adrp	x0, 0 <main_>
  2c:	91000000 	add	x0, x0, #0x0 ; x0 = parameter
  30:	f9400fa3 	ldr	x3, [x29, #24] ; x3 = p = num's address
  34:	2a0103e2 	mov	w2, w1         ; w2 = num = 123
  38:	b94017a1 	ldr	w1, [x29, #20] ; w1 = address = num's address
  3c:	94000000 	bl	0 <printf>
	printf("\n");
  40:	52800140 	mov	w0, #0xa                   	// #10
  44:	94000000 	bl	0 <putchar>
	printf("num = 0x%x\n  num-p = %p\n  \n", &num, &num);
  48:	910043a2 	add	x2, x29, #0x10                  ; x2 = x29+16 = num's address
  4c:	910043a1 	add	x1, x29, #0x10                  ; x1 = x29+16 = num's address
  50:	90000000 	adrp	x0, 0 <main_>
  54:	91000000 	add	x0, x0, #0x0
  58:	94000000 	bl	0 <printf>

	return 0;
  5c:	52800000 	mov	w0, #0x0                   	// #0
}
  60:	a8c27bfd 	ldp	x29, x30, [sp], #32
  64:	d65f03c0 	ret

0000000000000068 <p>:


void p(int ** src, int * des)
{
  68:	a9be7bfd 	stp	x29, x30, [sp, #-32]!
  6c:	910003fd 	mov	x29, sp
  70:	f9000fa0 	str	x0, [x29, #24] ; [x29+24]=src
  74:	f9000ba1 	str	x1, [x29, #16] ; [x29+16]=des
  printf("[%p : %p : %p : %p] src *src **src &src\n", src, * src, ** src, & src);
  78:	f9400fa1 	ldr	x1, [x29, #24] ; x1 = src  一级指针地址
        
  7c:	f9400fa0 	ldr	x0, [x29, #24] ; x0 = src
  80:	f9400002 	ldr	x2, [x0]       ; x2 = *src 一级指针地址指向的地址，即变量地址
        
  84:	f9400fa0 	ldr	x0, [x29, #24] ; x0 = src
  88:	f9400000 	ldr	x0, [x0]       ; x0 = *s
  8c:	b9400003 	ldr	w3, [x0]       ; w3 = **s 一级指针地址指向的变量地址上的值，即变量值
        
  90:	910063a4 	add	x4, x29, #0x18 ; x4 = x29+14 = src's self address
  94:	90000000 	adrp	x0, 0 <main_>
  98:	91000000 	add	x0, x0, #0x0
  9c:	94000000 	bl	0 <printf>
  printf("[%p:%p:%p] des *des &des\n", des, * des, & des);
  a0:	f9400ba1 	ldr	x1, [x29, #16]                   ; x1 = des = 指向变量的地址
  a4:	f9400ba0 	ldr	x0, [x29, #16]                   ; x0 = des = 指向变量的地址
  a8:	b9400002 	ldr	w2, [x0]                         ; w2 = *des
  ac:	910043a3 	add	x3, x29, #0x10                   ; x3 = x29 + 16 des's self address
  b0:	90000000 	adrp	x0, 0 <main_>
  b4:	91000000 	add	x0, x0, #0x0
  b8:	94000000 	bl	0 <printf>

  des = * src;
  bc:	f9400fa0 	ldr	x0, [x29, #24] ; x0 = [x29 + 24] = src 一级指针地址
  c0:	f9400000 	ldr	x0, [x0]       ; x0 = *src 一级指针地址指向的地址，即变量地址
  c4:	f9000ba0 	str	x0, [x29, #16] ; x0 = [x29+16] = des = *src
  printf("[%p:%p:%p] des *des &des\n", des, * des, & des)
  c8:	f9400ba1 	ldr	x1, [x29, #16] ; x1 = des
  cc:	f9400ba0 	ldr	x0, [x29, #16] ; x0 = des
  d0:	b9400002 	ldr	w2, [x0]       ; w2 = *des
  d4:	910043a3 	add	x3, x29, #0x10 ; x3 = des's self address
  d8:	90000000 	adrp	x0, 0 <main_>
  dc:	91000000 	add	x0, x0, #0x0
  e0:	94000000 	bl	0 <printf>
}
  e4:	d503201f 	nop
  e8:	a8c27bfd 	ldp	x29, x30, [sp], #32
  ec:	d65f03c0 	ret

00000000000000f0 <main>:

int main()
{
  f0:	a9bd7bfd 	stp	x29, x30, [sp, #-48]!
  f4:	910003fd 	mov	x29, sp
  int i = 8, j = 9;
  f8:	52800100 	mov	w0, #0x8                   	// #8
  fc:	b9002ba0 	str	w0, [x29, #40]  ; i = 8
 100:	52800120 	mov	w0, #0x9                   	// #9
 104:	b9002fa0 	str	w0, [x29, #44]              ; j = 9
  int ** shuan, * dan;
  
  i = j = 11;
 108:	52800160 	mov	w0, #0xb                   	// #11
 10c:	b9002fa0 	str	w0, [x29, #44]              ; j = 11
 110:	b9402fa0 	ldr	w0, [x29, #44]              ; w0 = j
 114:	b9002ba0 	str	w0, [x29, #40]              ; i = j
  printf("%d %d %d\n", 0 % 10, i, j);
 118:	b9402ba1 	ldr	w1, [x29, #40] ; w1 = i
 11c:	90000000 	adrp	x0, 0 <main_>
 120:	91000000 	add	x0, x0, #0x0 ; parameter
 124:	b9402fa3 	ldr	w3, [x29, #44] ; w3 = j
 128:	2a0103e2 	mov	w2, w1         ; w2 = i
 12c:	52800001 	mov	w1, #0x0                   	// #0
 130:	94000000 	bl	0 <printf>

  dan = & i;
 134:	9100a3a0 	add	x0, x29, #0x28 ; i's address
 138:	f9000fa0 	str	x0, [x29, #24] ; dan = &i
  shuan = & dan;
 13c:	910063a0 	add	x0, x29, #0x18 ; x0 = &dan
 140:	f90013a0 	str	x0, [x29, #32] ; shuang = &dan

  printf("[%p : %p] i &i\n", i, &i);
 144:	b9402ba1 	ldr	w1, [x29, #40] ; w1 = i
 148:	9100a3a2 	add	x2, x29, #0x28 ; x2 = i's address
 14c:	90000000 	adrp	x0, 0 <main_>
 150:	91000000 	add	x0, x0, #0x0
 154:	94000000 	bl	0 <printf>
  printf("[%p: %p : %p] dan *dan &dan\n", dan , * dan, & dan);
 158:	f9400fa1 	ldr	x1, [x29, #24]                       ; x1 = dan
 15c:	f9400fa0 	ldr	x0, [x29, #24]                       ; x0 = dan
 160:	b9400002 	ldr	w2, [x0]                             ; w2 = *dan
 164:	910063a3 	add	x3, x29, #0x18                       ; x3 = &dan
 168:	90000000 	adrp	x0, 0 <main_>
 16c:	91000000 	add	x0, x0, #0x0
 170:	94000000 	bl	0 <printf>
  printf("[%p : %p : %p : %p] shuan *shuan **shuan &shuan\n", shuan, * shuan, ** shuan, & shuan);
 174:	f94013a1 	ldr	x1, [x29, #32] ; x1 = shuan
 178:	f94013a0 	ldr	x0, [x29, #32] ; x0 = shuan
 17c:	f9400002 	ldr	x2, [x0]       ; x2 = *shuan
 180:	f94013a0 	ldr	x0, [x29, #32] ; x0 = shuan
 184:	f9400000 	ldr	x0, [x0]       ; x0 = *shuan
 188:	b9400003 	ldr	w3, [x0]       ; x3 = **shuan
 18c:	910083a4 	add	x4, x29, #0x20 ; x4 = &shuan
 190:	90000000 	adrp	x0, 0 <main_>
 194:	91000000 	add	x0, x0, #0x0
 198:	94000000 	bl	0 <printf>

  p(shuan, dan);
 19c:	f94013a0 	ldr	x0, [x29, #32] ; shuan
 1a0:	f9400fa1 	ldr	x1, [x29, #24] ; dan
 1a4:	94000000 	bl	68 <p>
 1a8:	52800000 	mov	w0, #0x0                   	// #0
}
 1ac:	a8c37bfd 	ldp	x29, x30, [sp], #48
 1b0:	d65f03c0 	ret
